﻿namespace Xenta.Entities
{
    /// <summary>
    /// Exposes a relation holder.
    /// </summary>
    public interface IRelationHolder<in TChild> : IEntity
        where TChild : IEntity
    {
        /// <summary>
        /// Maps a child entity to the parent entity.
        /// </summary>
        /// <param name="child">The child entity to map.</param>
        void Map(TChild child);

        /// <summary>
        /// Unmaps the child entity from the parent entity.
        /// </summary>
        /// <param name="child">The child entity to unmap.</param>
        void Unmap(TChild child);
    }
}
